<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>18_遍历数组-动态添加-innerHTML</title>
    </head>
    <body>
        <ul></ul>

        <script>
            var arr = ['李宁','回力','361度','安踏','鸿星尔克','斯凯奇'];

            var ul = document.querySelector('ul');

            var str = '';

            for(var i = 0; i < arr.length; i++){
                str += '<li>' + arr[i] + '</li>';
            }

            ul.innerHTML += str;

        </script>
    </body>
</html>